import { computed,unref} from "vue"
import {SYSTEM_WINDOW_INFO,MENU_BUTTON_RECT_INFO_} from "@/utils/config.js"
//状态栏高度([px])
export const statusBarH = computed(()=>SYSTEM_WINDOW_INFO.statusBarHeight || 25)

//标题栏高度
export const titleBearH = computed(()=>{
	const {top,height} =MENU_BUTTON_RECT_INFO_;
	if(!top || !height) return 40;
	return height + ((top -unref(statusBarH)) * 2)
})
//导航栏高度
export const navBarH = computed(()=>unref(statusBarH) + unref(titleBearH))
//导出所有状态
export const useNavBarStyle = ()=>{
	const statusBarHeight = computed(()=>unref(statusBarH) + "px")
	const titleBarHeight = computed(()=>unref(titleBearH) + "px")
	const headHeight = computed(()=>unref(navBarH) +  "px")
	return{
		statusBarHeight,
		titleBarHeight,
		headHeight
	}
}